#include "msfsf_node.hpp"

#include <commons/util/util.hpp>
#include <core/core.hpp>

int main(int argc, char *argv[])
{
    sros_info << "this generate by sros, name: msfsf, module: location, start..." << sros_endl;

    // create robot node
    auto node = std::make_shared<MsfsfNode>("MsfsfNode", "location");
    
    // put sros::node in sros::core for start node
    sros::Core::Param param
    {
        .nodes = std::vector<std::shared_ptr<sros::Node>>{node},
        .kill_signals = std::vector<int>{SIGINT},
        .sleep_ms = 10
    };
    
    // sros::code init
    auto ret = sros::Core::ins().init(param);
    if (!ret.v)
    {
        sros_info << ret.msg << sros_endl;
        return 0;
    }
    
    // sros::code run
    sros::Core::ins().run();
    
    sros_info << "this generate by sros, name: msfsf, module: location, stop..." << sros_endl;
}

